extends ../layout
block content

    link(rel='stylesheet', href='#{indexcss}')
    script(src='#{markedscript}', type='text/javascript')
    script(src="#{highlightscript}")
    script(src='/index/index.js', type='text/javascript')
    script(type='text/javascript').
        //实例化键盘监听
        let methods = new KeyClick();
        //初始化页面快捷键和高度监听事件
        methods.control()

        hljs.initHighlightingOnLoad();
        //实例化菜单监听
        let menu = new MenuClick();

    include ../public/index/props

    .row.col-md-12.clearPadding
        .main-left.col-md-6.col-sm-6.col-xs-6.clearPadding
            textarea(id="texts" rows="3" oninput="methods.UpdateChange()" placeholder="DBeditor The Best MarkDown Editor")
            ul.menu-list-icons
                - var menu  = menulist
                - for(var i=0; i< menu.length; i++){
                li( id='#{menu[i].id}')
                    img(mdui-tooltip="{content: '#{menu[i].tips}'}" onclick="#{menu[i].function}" src="#{menu[i].icon}")
                - }

                span(class="state" id="editstate") 当前:

            include ../public/index/emoji
        .main-right.col-md-6.col-sm-6.col-xs-6.clearPadding
            div(id='show')

        include ../public/index/menu

    include ../public/index/tips

    script(type='text/javascript').
        methods.changeDivHeight();
        $("#texts").scroll(function () {$("#show").scrollTop($("#texts").scrollTop())});